[Top] [Prev] [Next] [Bottom] [Contents]

SaRegVbsScripts

Registers a built-in data site callback function which will insert VB Script functions in a Sapphire server application at the specified data site in the HTML template.

Synopsis

#include "savbs.h"
int SaRegVbsScripts(int kind, char* filename, char* 
site);

Argument

kind
Specifies which VB Script function(s) to print. Valid defined constants and the function they use to print are:
SAVBS_DATENOW - SaVbsDateFixNow()
SAVBS_DATE - SaVbsValDate()
SAVBS_DATE_FUT - SaVbsValDateFuture()
SAVBS_DATE_PAST - SaVbsValDatePast()
SAVBS_FORMAT - SaVbsSimpleFormat()
SAVBS_CREDIT - SaVbsCardCheck()
SAVBS_ZIP - SaVbsZipCheck()
SAVBS_SSN - SaVbsSsnCheck()
SAVBS_EMAIL - SaVbsValEmail()
SAVBS_STATE - SaVbsState()
SAVBS_LETTERS - SaVbsIsAllLetters()
SAVBS_DIGITS - SaVbsIsAllDigits()
SAVBS_NOBLANK - SaVbsIsFieldNotBlank()
filename
A string specifying the filepath name of an HTML template file. If non-null and not an empty string, this file will be "played", if it is not already on the "play" list. If NULL or an empty string, the site will still be registered, but can be overridden by a similar site name with a specified filename.
site
A string specifying the site name to register the site function callback on.

Return Values

Returns 1 on success. Returns 0, if site is either NULL or an empty string.

Description

Registers a built-in data site callback function which will insert VB Script functions in a Sapphire server application at the specified data site in the HTML template. The parameter, kind, specifies which function(s) are inserted at the site.

Example

The code fragment:

SaRegVbsSrcipts(0, NULL, "VBScripts");
will write a string to standard out which is equivalent to the contents of the file:

config\htmlstyle\Xvbs.vbs
in the Sapphire distribution. This will only be written when the site, ##Sa_VBScripts## is in the HTML template file.

See Also

SaVbsSsnCheck, SaVbsZipCheck, SaVbsCardCheck, SaVbsDateFixNow

SaVbsValDate, SaVbsValDateFuture, SaVbsValDatePast\x7f , SaVbsIsAllDigits

SaVbsIsAllLetters, SaVbsIsFieldNotBlank, SaVbsValEmail, SaVbsState

SaVbsSimpleFormat, SaPrintVbsScripts



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.